import {Role} from './Role'

/*
- 创建一个类Plant继承Role，属性有
-  cost（需要多少花费）,power(攻击力),income（收入)
- 用constructor初始化这些类
- 覆盖toHtml方法，返回img 带className='plant'
- 导出默认Plant
*/

export default class Plant extends Role {
  constructor(
    name, img, health, cost, power, income) {
    super(name, img, health)
    this.cost = cost
    this.power = power
    this.income = income
  }

  toHtml() {
    return '<img src="..." class="plant">...'
  }
}